package com.xiaoyu.izf.repository;

import com.xiaoyu.izf.model.UserInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface UserInfoDao extends JpaRepository<UserInfo, Integer>, JpaSpecificationExecutor<UserInfo> {

    public UserInfo findById(int id);

    public UserInfo findOneById(int id);

    public UserInfo findByUserName(String userName);

    public UserInfo findByToken(String token);

    public UserInfo findByPushCode(String pushCode);

    public UserInfo findByOfficialServiceNumber(String officialServiceNumber);

    public List<UserInfo> findAllByPushUid(int pushUid);

    UserInfo findByRegionCode(String regionCode);
}
